<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8" />
    <title>array方法</title>
    <script>
        var arr = [11, 22, 33, 44];
        //push
        /* var len = arr.push(55);
        console.log(len);
        console.log(arr); */

        //unshift
        /* var len = arr.unshift(0);
        console.log(len);
        console.log(arr); */

        //pop
        /* var value = arr.pop();
        console.log("删除的最后一个元素为:" + value);
        console.log(arr); */

        //shift
        /* var value = arr.shift();
        console.log(value);
        console.log(arr); */


    </script>
</head>

<body>
</body>